<?php
namespace app\common\validate;

use think\Validate;

class BannerValidate extends Validate
{
    protected $rule =   [
        'page|页数'            => 'require|integer',
        'limit|条数'           => 'require|integer',
        'id'                   => 'require|integer',
        'img'                  => 'require|image',
    ];
    
    protected $scene = [
        /** admin */
        'list'      => ['page', 'limit'],
        'add'       => ['img'],
        'edit'      => ['id', 'img'],
        'show'      => ['id'],
    ];
}